feat!: make CLI output JSON by default - #106
Merged
Merged
Conversation
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behavior
Agents previously needed to select machine mode per command, while help, setup and hub output still required prose parsing. Commands now emit compact JSON by default in terminals and pipes, including structured help, version, setup receipts and failures. Diagnostics use JSONL on stderr.
Existing tool JSON payloads and
--jsoninvocations retain their shapes. Batch/field projection preserve their JSONL contracts;batch --jsonreturns an array. Hub emits ready/reused/stopped records. Output defaults to 262,144 bytes per document or JSONL record with explicit truncation; an explicit batch byte ceiling bounds the whole batch. Human-output consumers must migrate, and large-result consumers can paginate, select fields or raise the byte budget.Help and accepted options share one command registry. Setup receipts preserve planned/applied/manual artifacts and package-manager next steps without source dumps. Errors exclude malformed input and raw upstream exception text from trusted messages and provide safe recovery argv. Collector APIs are unchanged.
See the JSON CLI contract and research for the migration and primary Vercel CLI UX, Google Workspace CLI, GitHub CLI, agent-browser and JSON Lines sources. JSON-only defaults are an intentional Genie decision, not a claimed universal industry standard.
Validation
pnpm check: lint, types, build, installed release-artifact checks, 1,184 tests and documentation passed.--json; all four lanes and script entry passed.Pre-1.0 minor changeset explicitly declares the default-output migration. No new dependencies or hosted services.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.